﻿using Autofac;

using Cookbook.Services.Core.Persistency.Common;
using Cookbook.Services.Core.Persistency.NHibernate;

namespace Cookbook.Services.Core.Persistency
{
    public class CookbookUnitOfWorkFactory : NHibernateUnitOfWorkFactory<CookbookUnitOfWork>
    {
        public CookbookUnitOfWorkFactory(ILifetimeScope lifetimeScope) : base(lifetimeScope)
        {
        }

        protected override CookbookUnitOfWork CreateUnitOfWork(IDataMapper mapper)
        {
            return new CookbookUnitOfWork(mapper);
        }
    }
}